import request from '@/router/axios';

// 查询宠物属性分页
export function getBindPetAttributePage(params) {
  return request({
    url: '/core/attribute/page/bind',
    method: 'get',
    params,
  });
}

// 关联宠物属性
export function bindPetAttribute(data) {
  return request({
    url: '/core/attribute/bind',
    method: 'post',
    data,
  });
}

// 编辑关联宠物属性
export function editBindPetAttribute(data) {
  return request({
    url: '/core/attribute/bind',
    method: 'put',
    data,
  });
}

// 删除关联宠物属性
export function delBindPetAttribute(id) {
  return request({
    url: `/core/attribute/bind/${id}`,
    method: 'delete',
  });
}

// 获取关联宠物属性项
export function getAttributes(id) {
  return request({
    url: `/core/attribute/list/${id}`,
    method: 'get',
  });
}

// 获取关联宠物属性list
export function getBindPetAttributeList(classCode, code) {
  return request({
    url: `/core/attribute/list/bind/${classCode}/${code}`,
    method: 'get',
  });
}
